/* Copyright(C) 2025. Huawei Technologies Co.,Ltd. All rights reserved.
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

// Package constants a constants parameters for slownode
package constants

const (
	// FileMode write file mode
	FileMode = 0644

	// NodeLevelDetectionResult is the path where store the tp/pp/ slow node algo result
	NodeLevelDetectionResult = "NodeLevelDetectionResult"
	// ParallelGroupSuffix is the suffix for the parallel group info
	ParallelGroupSuffix = "_parallel_group.json"
)

const (
	// CmConsumer who uses these configmap
	CmConsumer = "fd-ol-slow-node"
	// CmConsumerValue the value only for true
	CmConsumerValue = "true"
	// ClusterJobPrefix is prefix of slow node job in cluster
	ClusterJobPrefix = "ras-feature-slownode"
	// NodeJobPrefix is the job prefix of slow node job
	NodeJobPrefix = "slow-node-job"
	// NodeAlgoResultPrefix is prefix of slow node node algo result name
	NodeAlgoResultPrefix = "slow-node-algo-result"
	// NodeDataProfilingResultPrefix is the prefix of slow node node data parse result name
	NodeDataProfilingResultPrefix = "data-profiling-result"
	// NodeRestartInfoPrefix node restart Info prefix
	NodeRestartInfoPrefix = "node-restart-info"
	// NodeIpCMKey configmap key for not restart info
	NodeRestartInfoCMKey = "nodeIp"
	// ClusterJobCMKey configmap key for slow node feature
	ClusterJobCMKey = "FeatConf"
	// NodeJobCMKey is the configmap key for node slow node job
	NodeJobCMKey = "NodeSlowNodeJob"
	// NodeAlgoResultCMKey configmap key for slow node algo result
	NodeAlgoResultCMKey = "NodeSlowNodeAlgoResult"
	// NodeDataProfilingResultCMKey configmap key
	NodeDataProfilingResultCMKey = "NodeDataProfilingResult"
	// ClusterFilePath cluster local file path
	ClusterFilePath = "/user/slownode-cluster"
	// NodeFilePath node local file path
	NodeFilePath = "/user/cluster-info/profiling"
	// ParallelGroupInfo file name
	ParallelGroupInfo = "parallel_group.json"
	// MinStepCount is the count of csv file generated by the data parse
	MinStepCount = 20
	// IsDegradation is the sign of node degradation
	IsDegradation = 1
)
